



import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


main()=> runApp(CLMyapp());

class CLMyapp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
        home: CLbody()
    );
  }
}


class CLbody extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return
      Scaffold(
        appBar: AppBar(
          title:Text("按钮") ,
        ),
        body:  CLbodycontent(),
        floatingActionButton: FloatingActionButton(
          child: Icon(Icons.add),
          onPressed: (){
            print('jh');
          },
        ),


      );
  }
}
class CLbodycontent extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _CLbodycontentState();
  }
}

class _CLbodycontentState extends State<CLbodycontent> {
  final imageURL = "https://img1.baidu.com/it/u=211652494,2598660937&fm=26&fmt=auto";

  @override
  Widget build(BuildContext context) {
    return const Image(
        image: AssetImage("assets/images/a.jpg")
    );
  }
}

class imagedemo1 extends StatelessWidget {
  const imagedemo1({
    Key? key,
    required this.imageURL,
  }) : super(key: key);

  final String imageURL;

  @override
  Widget build(BuildContext context) {
    return Image(
      image: NetworkImage(imageURL),
      width: 200,
      height: 200,//本应该是正方形，是因为没有占满
      fit: BoxFit.fitWidth,
      alignment: Alignment(0,0),



    );
  }
}